<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="/js/echarts.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.common.min.js"></script>
    <script type="text/javascript" src="resources/js/echarts/dist/echarts.min.js"></script>
    <title></title>
</head>
<body>
<div id="test" style=" width:600px ; height:400px;"></div>
<script type="text/javascript">
    var myChart = echarts.init(document.getElementById('test'));
    var option = {
        title: {
            text: '文章分析'
        },
        tooltip:{},
        legend:{
            data:['人数']
        },
        xAxis: {
            data: ["远古生物","70后","80后","90后","00后"]
        },
        yAxis:{},
        series:[{
            name:'人数',
            type:'bar',
            data:[{{$data[0]}},{{$data[1]}},{{$data[2]}},{{$data[3]}},{{$data[4]}}],
        }]
    };
    myChart.setOption(option);
</script>
</body>
</html>
